home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 050 / madtrb17.arc / SPELLCHK.PAS < prev    next >
Pascal/Delphi Source File  |  1985-06-14  |  813b  |  39 lines

  1. program SPELLCHK;
  2. { used to check the SPELLER.LIS file for out of place words.}
  3. type
  4.         files = text;
  5. var
  6.         filecheck : files;
  7.         word, oldword : string [24];
  8.         wordcount, line : integer;
  9. begin
  10. assign (filecheck, 'speller.lis');
  11. reset (filecheck);
  12. word := '';
  13. oldword := '';
  14. ClrScr;
  15. gotoxy (30,1);
  16. writeln ('CHECKING SPELLER.LIS');
  17. gotoxy (30,3);
  18. write   ('   WORD :  ');
  19. gotoxy (1, 5);
  20. line := 5;
  21. readln (filecheck, word);
  22. wordcount := 1;
  23. while not eof (filecheck) do begin
  24.    oldword := word;
  25.    readln (filecheck, word);
  26.    wordcount := wordcount+1;
  27.    gotoxy (41,3);
  28.    write (wordcount);
  29.    if not (word > oldword) then begin
  30.       line := line+1;
  31.       gotoxy (1,line);
  32.       writeln (oldword, '  ', word);
  33.    end;
  34. end;
  35. close (filecheck);
  36. end.
  37.  
  38. 
  39.